<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!--字符串-->
    <p th:text="${hello}"></p>
<!--表单提交-->
    <form th:action="@{/demo/test}">
        <input th:type="text" th:name="id" th:value="${id}">
        <button>提交</button>
    </form>
    <form action="/demo/test">
        <input type="text" name="id2">
        <button>提交2</button>
    </form>
<!--list-->
    <table th:each="user,userStat:${users}">
        <tr>
            <th>下标</th>
            <th>序号</th>
            <th>id</th>
            <th>姓名</th>
            <th>地址</th>
        </tr>
       <tr>
           <td th:text="${userStat.count}"></td>
           <td th:text="${userStat.index}"></td>
           <td th:text="${user.id}"></td>
           <td th:text="${user.name}"></td>
           <td th:text="${user.address}"></td>
       </tr>
    </table>
<!--map-->
    <table th:each="entry,mapStat:${map}">
        <tr>
            <th>下标</th>
            <th>序号</th>
            <th>键值对</th>
            <th>键</th>
            <th>键</th>
            <th>值</th>
            <th>值</th>
        </tr>
        <tr>
            <td th:text="${mapStat.index}"></td>
            <td th:text="${mapStat.count}"></td>
            <td th:text="${entry}"></td>
            <td th:text="${entry.key}"></td>
            <td th:text="${mapStat.current.key}"></td>
            <td th:text="${entry.value}"></td>
            <td th:text="${mapStat.current.value}"></td>
        </tr>
    </table><br>
<!--javaBean-->
    <span th:text="${user1.id}"></span><br>
    <span th:text="${user1}"></span><br>
<!--数组-->
    <span th:each="nm,nameStat:${names}">
        <span th:text="${nameStat.count}"></span>
        <span th:text="${nm}"></span><br>
    </span>

<div>
    <span th:text="${#dates.format(now,'yyyy-MM-dd hh:mm:ss')}"></span>
</div>

<div>
    <span th:if="${(age>18)}">终于成年了</span>
</div>
<div>
    <span th:include="footer::copy"></span>
</div>
</body>
</html>